package day1206zy.day1206zy11;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;
import java.util.Properties;
import java.util.Set;

public class demo11 {
    public static void main(String[] args) throws IOException {
        Properties p = new Properties();
        p.setProperty("username","jack");
        p.setProperty("uid","001");
        p.setProperty("password","123");
        Set<String> keys = p.stringPropertyNames();
        for (String key : keys) {
            String value = p.getProperty(key);
            FileUtils.writeStringToFile(new File("src\\day1206zy11\\t4.properties"),key+"="+value+"\r\n","utf-8",true);
        }
    }
}
